package com.tkuniyoshi.battleshipgame.common.property.element;

import com.tkuniyoshi.battleshipgame.common.Exception.BattleShipException;
import com.tkuniyoshi.battleshipgame.common.log.BattleShipLogMessage;
import com.tkuniyoshi.battleshipgame.common.log.BattleShipLogger;
import com.tkuniyoshi.battleshipgame.common.log.intf.LogMessage;

import android.location.Location;

public class GPSElement implements PropertyElement{
	private Location location;
	
	public GPSElement(Location location){
		this.location = location;
	}

	@Override
	public Location getValue() {
		return location;
	}

	@Override
	public void validate() throws BattleShipException{
		if(location == null){
			throw new BattleShipException(BattleShipLogMessage.E10101);
		}
	}
}
